<include file="App/Admin/View/Public/left.html"/>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/kindeditor/plugins/prettify.js"></script>
<script>
	function checkForm(){
		editor.sync();
		var name = document.getElementById('title').value;

		if(name != ""){
			document.getElementById('myform').submit();
		}else{
			alert('请填写标题');
		}
	}
</script>

<div class="main-wrap">
  <div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="{:U('Index/index')}">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="{:U('Config/huilv')}">称号奖兑换审核</a><span class="crumb-step">&gt;</span><span>详情</span></div>
  </div>
  <div class="result-wrap">
    <div class="result-content">
	  <br><br>
	  <table class="search-tab">
		   
			<tr>   
				<th><i class="require-red">*</i>开始时间：</th>
				<td>
		
				<div class="row"><div class="col-md-6">
								<i class="fa fa-calendar"></i></span>
								<input type="text" name="add_time" class="ui_timepicker" id="aaaaa1" placeholder="选择日期时间" value="{$add_time|date='Y-m-d H:i:s',###}"  />
							</div></div></td>
			  <script type="text/javascript">
				$(function () {
					$("#aaaaa1").datetimepicker({
						//showOn: "button",
						//buttonImage: "./css/images/icon_calendar.gif",
						//buttonImageOnly: true,
						showSecond: true,
						timeFormat: 'hh:mm:ss',
						stepHour: 1,
						stepMinute: 1,
						stepSecond: 1
					})
						$("#aaaaa2").datetimepicker({
						//showOn: "button",
						//buttonImage: "./css/images/icon_calendar.gif",
						//buttonImageOnly: true,
						showSecond: true,
						timeFormat: 'hh:mm:ss',
						stepHour: 1,
						stepMinute: 1,
						stepSecond: 1
					})
			   
				})
			</script>
				<th><i class="require-red">*</i>截止时间：</th>
				<td><div class="row"><div class="col-md-6">
								<i class="fa fa-calendar"></i></span>
								<input type="text" name="end_time" class="ui_timepicker" id="aaaaa2" placeholder="选择日期时间" value="{$end_time|date='Y-m-d H:i:s',###}" / >
							</div></div></td>
				<td><input class="btn btn-primary btn2" name="sub" value="下载表格" type="button" onclick="download()"></td>
			</tr>
		</table>
    </div>
  </div>
  <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>编号</th>
                            <th>会员id</th>
                            <th>会员</th>
                            <th>会员电话</th>
                            <th>等级</th>
                            <th>奖励内容</th>
                            <th>时间</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        <volist name="list" id="vo" empty="$empty">
                        <tr>
                            <td>{$vo.id}</td>
                             <td>{$vo.member_id}</td>
                            <td>{$vo.user.name}</td>
                            <td>{$vo.user.phone}</td>
                             <td>{$vo.level}</td>
                            <td>{$vo.content}</td>
                            <td>{$vo.add_time|date="Y-m-d H:i:s",###}</td>
                            <td>
                                <if condition="$vo.status eq 0">
                                       【未兑换】
                                </if>
                                 <if condition="$vo.status eq 1">
                                       【已兑换,等待审核】
                                </if>
                                 <if condition="$vo.status eq 2">
                                       【已通过】
                                </if>
                            </td>
                            <td>
                                <if condition="$vo.status eq 0">
                                       
                                </if>
                                <if condition="$vo.status eq 1">
                                       <a href="{:U('Member/chenghaoTong',array('id'=>"$vo[id]"))}">通过审核</a>
                                </if>
                                 <if condition="$vo.status eq 2">
                                       
                                </if>
                            </td>
                            
                        </tr>
                        </volist>
                    </table>
          <div class="list-page"> <ul>{$page}</ul></div>
                </div>
            </form>
        </div>

</div>

<!--/main-->

</div>
</body></html>
<script>
$(".sub-menu").eq(1).show();
$("#myform").ready(function(e) {
  $(".sub-menu").eq(1).children("li").eq(5).addClass("on");
});
</script>
<script>
function download(){
	var add_time=$('#aaaaa1').val();
	var end_time=$('#aaaaa2').val();
	var url="{:U('Member/zhanghu_excel')}";
	window.location.href=url+"?add_time="+add_time+"&&end_time="+end_time;
}
</script>